<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // function reverse(arr) {
        //     if (arr instanceof Array) {
        //         var arr1 = [];
        //         for (var i = arr.length - 1; i >= 0; i--) {
        //             arr1[arr1.length] = arr[i];
        //         }
        //         return arr1;
        //     }
        // }
        // console.log(reverse([1, 2, 3]));
        // var arr = [];
        // console.log(arr instanceof Array);
        // console.log(Array.isArray(arr));
        var arr = [1500, 2500, 3000, 8000, 9000];
        var newarr = [];
        for (var i = 0; i < arr.length; i++) {
            if (arr[i] >= 8000) {
                newarr.push(arr[i]);
            }
        }
        console.log(newarr);
    </script>
</head>

<body>

</body>

</html>